Image scanning apparatus and method implemented in the same

ABSTRACT

An image scanning apparatus, comprising: a scanning device; a reference member; a correction unit; a controller; and a storage device, the scanning device comprising light receiving elements and a lens array, wherein the controller executes: a preparation process and an executive process, the preparation process comprising: a white reference data obtaining process to obtain white reference data by scanning a white reference original; and a white storing process to obtain white basic data by averaging the white reference data of a particular number of adjoining light receiving elements, wherein the executive process comprises: a reference member data obtaining process to obtain reference member data by scanning the reference member; a lens fluctuation calculation process to calculate fluctuation data of the correction data based on the reference member data; and a correction data generation process to generate the correction data by adding the fluctuation data to the white basic data.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority under 35 U.S.C. §119 from JapanesePatent Application No. 2016-061415, filed on Mar. 25, 2016. The entiresubject matter of the application is incorporated herein by reference.

BACKGROUND

Technical Field

Aspects of the present disclosures relate to an image scanningapparatus.

Related Art

An image scanning apparatus configured to store, in a non-volatilememory, white reference data obtained by scanning a white referenceplate and to perform shading correction using the stored white referencedata is known. In the image scanning apparatus, a contact type imagesensor including a light source, a rod lens array and photoelectricconversion elements is used. It is known that, in such a contact typeimage sensor, larger amount of light is collected in a central portionof each single lens of the rod lens array and smaller amount of light iscollected in a peripheral portion of each single lens of the rod lensarray. In addition, in the contact type image sensor the position of therod lens array and the position of the photoelectric conversion elementsmay shift with respect to each other due to a difference in expansioncoefficient or a difference in fixing manner between a board mountingthe photoelectric conversion elements and a board mounting the rod lensarray.

The above described conventional image scanning apparatus is furtherconfigured to calculate, in regard to a particular number ofphotoelectric conversion elements disposed within an interval betweenadjacent lenses of the rod lens array, the maximum value and the minimumvalue of image data obtained by performing shading correction using thestored white reference data so as to decrease a scanning error due tothe above described position shift. The image scanning apparatusdetermines the scanning start position being a pixel position at whichthe scanning is started so that the difference between the calculatedmaximum value and the minimum value obtained while shifting the scanningstart position pixel by pixel is minimized

SUMMARY

In the above described image scanning apparatus, an optimum scanningstart position is determined by shifting pixel by pixel the scanningstart position. Therefore, the potential position shift, which is lessthan a shift amount of one pixel, between the rod lens array and thephotoelectric conversion elements may bring some difficulties to performprecise shading correction using the stored white reference data.

In consideration of the above, aspects of the disclosures provide animage scanning apparatus capable of performing precise shadingcorrection using white reference data stored in advance in anon-volatile memory.

According to an aspect of the present disclosure, there is provided animage scanning apparatus, comprising: a scanning device configured toscan an original sheet; a reference member disposed to face the scanningdevice; a correction unit configured to execute shading correction forimage data obtained by the scanning device based on correction data; acontroller; and a storage device. The scanning device comprises: a lightsource; a plurality of light receiving elements arranged in one line;and a lens array having a plurality of lenses, the lens array beingconfigured to converge light emitted by the light source onto theplurality of light receiving elements. The controller is configured toexecute: a preparation process; and an executive process to be executedafter execution of the preparation process. The preparation processcomprises: a white reference data obtaining process in which thecontroller obtains white reference data for each of the plurality oflight receiving elements in the one line by causing the scanning deviceto scan a white reference original sheet; and a white storing process inwhich the controller obtains white basic data by averaging, for each ofthe plurality of light receiving elements in the one line, the whitereference data of a particular number of successively adjoining elementsof the plurality of light receiving elements and stores the white basicdata in the storage device. An interval spaced by the particular numberof elements corresponds to an interval of the plurality of lenses of thelens array. The executive process comprises: a reference member dataobtaining process in which the controller obtains reference member datafor each of the plurality of light receiving elements in the one line bycausing the scanning device to scan the reference member; a lensfluctuation calculation process in which the controller calculates, foreach of the plurality of light receiving elements in the one line,fluctuation data of the correction data based on the reference memberdata; and a correction data generation process in which the controllergenerates, for each of the plurality of light receiving elements in theone line, the correction data by adding the fluctuation data to thewhite basic data.

BRIEF DESCRIPTION OF THE ACCOMPANYING DRAWINGS

FIG. 1 schematically illustrates an internal configuration of an imagescanning apparatus according to an illustrative embodiment.

FIG. 2 is an enlarged view of a configuration of a scanning device inthe image scanning apparatus.

FIG. 3 is a block diagram illustrating a configuration of a lightreceiving unit of the scanning device.

FIG. 4 is a block diagram illustrating an electric configuration of theimage scanning apparatus.

FIG. 5 is a flowchart illustrating a maintenance main process accordingto the illustrative embodiment.

FIG. 6 is a flowchart illustrating a five pixel white average 5WBdif1obtaining process according to the illustrative embodiment.

FIG. 7 is a flowchart illustrating a scanning main process according tothe illustrative embodiment.

FIG. 8 is a flowchart illustrating a reference data CD1 calculationprocess according to the illustrative embodiment.

FIG. 9 is a flowchart illustrating a five pixel gray average 5LGBdif1obtaining process according to the illustrative embodiment.

FIG. 10 is a flowchart illustrating a five pixel white average 5WBdif2obtaining process according to the illustrative embodiment.

FIG. 11 is a flowchart illustrating a reference data CD2 calculationprocess according to the illustrative embodiment.

DETAILED DESCRIPTION

It is noted that various connections are set forth between elements inthe following description. It is noted that these connections in generaland, unless specified otherwise, may be direct or indirect and that thisspecification is not intended to be limiting in this respect. Aspects ofthe present disclosure may be implemented on circuits (such asapplication specific integrated circuits) or in computer software asprograms storable on computer-readable media including but not limitedto RAMs, ROMs, flash memories, EEPROMs, CD-media, DVD-media, temporarystorage, hard disk drives, floppy drives, permanent storage, and thelike.

Hereafter, an image scanning apparatus 1 according to an illustrativeembodiment is described with reference to the accompanying drawings. InFIG. 1, the up and down direction and the front and rear direction areindicated by two-headed arrows.

(Mechanical Configuration of Image Scanning Apparatus)

As shown in FIG. 1, the image scanning apparatus 1 includes a papersupply tray 2, a body unit 3 and a paper discharge tray 4. On an uppersurface of the body unit 2, an operation unit 5 and a display unit 6 aredisposed. The operation unit 5 includes a power switch and varioussetting buttons. For example, the operation unit 5 includes a startbutton for instructing start of the scanning operation, an operationbutton for setting resolution. The display unit 6 includes, for example,an LCD (Liquid Crystal Display) to display a status of the imagescanning apparatus 1.

A conveying path 20 is formed in the inside of the body unit 3. Anoriginal sheet GS placed on the paper supply tray 2 is conveyed in aconveying direction FD along the conveying path 20, and is discharged tothe paper discharge tray 4. Along the conveying path 20, a supply roller21, a separation pad 22, a pair of upstream conveying rollers 23, ascanning device 24, a platen glass 25 and a pair of downstream conveyingrollers 26 are disposed.

The supply roller 21 operates, in cooperation with the separation pad22, to supply one by one a plurality of original sheets placed on thepaper supply tray 2. The upstream conveying rollers 23 and thedownstream conveying rollers 26 are driven by a conveying motor MT (seeFIG. 4). The platen glass 25 has optical transparency, and is disposedon a lower side with respect to the conveying path 20 to be along theconveying path 20. The conveying rollers 23 and 26 convey the originalsheet GS supplied from the paper supply roller 21 so as to let theoriginal sheet GS pass an upper surface of the platen glass 25.

In this illustrative embodiment, the original sheet GS is placed on thepaper supply tray 2 such that a scanning surface of the original sheetGS points to a placement surface of the paper supply tray 2. Thescanning device 24 is disposed on a lower side with respect to theconveying path 20, and scans an image formed on the scanning surface ofthe original sheet GS passing through the platen glass 25. An originalsensor 27 is disposed at the paper supply tray 2. The original sensor 27turns on when the original sheet GS is placed on the paper supply tray2, and turns off when no original sheet GS is placed on the paper supplytray 2.

(Detailed Configuration of Scanning Device)

The detailed configuration of the scanning device 24 will now beexplained with reference to FIGS. 2 and 3. As shown in FIG. 2, thescanning device 24 includes a light source 30, a light receiving unit 31and a rod lens array 32. The light source 30 includes three color lightemitting diodes of red, green and blue. When light is reflected from thescanning surface of the original sheet GS, the rod lens array 32converges the reflected light onto the light receiving unit 31. In thisillustrative embodiment, in a state where a color mode is selected, aline of the image of the original sheet GS is scanned while causing thethree color light emitting diodes to sequentially turn on. In a statewhere a monochrome mode is selected, a line of the image of the originalsheet GS is scanned while one of the three colors diodes (e.g., a greencolor light emitting diode) is turned on. For example, the scanningdevice 24 is configured to be able to scan an image in resolution of 300DPI with respect to an original sheet having A4 width being 210 mm(millimeter).

A gray reference plate 34 is disposed at a position facing the scanningdevice 24 via the conveying path 20. The gray reference plate 24 hasreflectivity lower than that of white being a background color of theoriginal sheet GS. When no original sheet GS exists on the conveyingpath 20, the light emitted from the light source 30 is reflected fromthe gray reference plate 34, and is received by the light receiving unit31 via the rod lens array 32. The rod lens array 32 includes a pluralityof rod lenses arranged in a main scanning direction MD. For example,intervals between the rod lenses of the rod lens array 32 are 0.4 mm Inthis illustrative embodiment, the density of a gray color of the grayreference plate 34 is closer to the density of black color, and presentsa lower reflection density than a reflection density of white color evenwhen the light source 30 is activated at the maximum light amount.

In FIG. 3, the light receiving unit 31 includes sensor IC chips CH1 toCH 12 (hereafter, referred to as chips CH1 to CH12). Each of the chipsCH1 to CH12 includes a plurality of photoelectric conversion elements 33arranged in the main scanning direction MD. Each of the chips CH1 toCH12 further includes therein a shift register and an amplifier (notshown). In each of the photoelectric conversion elements 33, chargescorresponding to a received light amount are accumulated, and theaccumulated charges of each photoelectric conversion element 33 areoutput as an analog signal of each pixel. A pixel located, on the chipCH1 disposed on the most upstream side in the main scanning directionMD, at one end not adjoining the other chips CH2 to CH12 is defined as atop pixel. A pixel located, on the chip CH 12 disposed on the mostdownstream side in the main scanning direction MD, at one end notadjoining the other chips CH1 to CH11 is defined as a last chip. Sinceeach of the chips CH1 to CH12 includes 216 photoelectric conversionelements 33, the total number of the photoelectric conversion elements33 is 2592. The pixel number PN of the top pixel is 1, and the pixelnumber PN of the last pixel is 2592. In this illustrative embodiment,each of the chips CH1 to CH12 has the same output characteristicsregarding pixels provided therein. However, the output characteristicsof pixels between the chips CH1 to CH12 may vary. The term one linemeans a pixel group constituted by the pixels from the top pixel to thelast pixel.

(Electric Configuration of Image Scanning Apparatus)

An electric configuration of the image scanning apparatus 1 will now beexplained with reference to FIG. 4. As shown in FIG. 4, the imagescanning apparatus 1 includes, as principal components, a CPU 40, a ROM41, a RAM 42, a flash PROM 43, a device controller 44, an analog frontend (hereafter, abbreviated as AFE) 45, an image processing unit 46, anda drive circuit 47. These components are connected to the operation unit5, the display unit 6 and the original sensor 27 via a bus 48.

The ROM 41 stores programs for executing various processes of the imagescanning apparatus 1. The programs may include, but not be limited to, amaintenance main process, a scanning main process, and processes forsubroutines of each main process. The CPU 40 controls the respectiveunits and components in accordance with programs read from the ROM 41.The flash PROM 43 is a nonvolatile memory which is readable andwritable, and stores various types of data, such as data generatedduring a control process and data calculated in the maintenance mainprocess. The RAM 42 temporarily stores data, such as calculation resultsgenerated by the control process by the CPU 40.

The device controller 44 is connected to the scanning device 24. Inaccordance with instructions from the CPU 40, the device controller 44transmits, to the light source 30, a signal for controlling on or off ofthe light source 30 and a signal for controlling a current value flowingthrough the light source 30. Further, as shown in FIG. 3, the devicecontroller 44 transmits, to the light receiving unit 31, a serial-insignal SI for transferring electric signals of the plurality ofphotoelectric conversion elements 33 to the shift register, and a clocksignal CLK for sequentially outputting the electric signals from theshift register. When the scanning device 24 receives these controlsignals from the device controller 44, the scanning device 24 turns onthe light source 30, and transmits, to the AFE 45, an analog signalcorresponding to the light amount received by the light receiving unit31. The maximum light amount which the light source 30 outputs isdefined by a maximum current preliminary set, and a maximum time periodfor which the light source 30 can be turned on within intervals of theserial-in signal SI.

The AFE 45 is connected to the scanning device 24. In accordance withinstructions from the CPU 40, the AFE 45 converts the analog signaltransmitted from the scanning device 24 into digital data. The AFE 45has an input range and resolution preliminary set. For example, theresolution defined as 10 bit corresponds to “0” to “1023” gray scales.In this case, the AFE 45 converts the analog signal transmitted from thescanning device 24 into 10 bit gray scale data (0 to 1023). The digitaldata converted by the AFE 45 is then transmitted to the image processingunit 46. In the AFE 45, an offset adjustment value indicating an offsetadjustment amount for offset-adjusting the analog signal transmittedfrom the scanning device 24, and a gain adjustment value indicating again adjustment amount for gain-adjusting the analog signal which hasbeen offset-adjusted are set. The AFE 45 converts the offset-adjustedand gain-adjusted analog signal into digital data.

The image processing unit 46 is constituted by an ASIC (an ApplicationSpecific Integrated Circuit) which is an exclusive IC, and is configuredto execute various types of image processing. The image processingincludes a shading correction and a gamma correction. The imageprocessing unit 46 may be set not to execute the various imageprocessing or may be set to execute all the various image processing.The image processing unit 46 subjects the digital data to the set imageprocessing to generate digital image data. The digital image data isstored in the RAM 42 via the bus 48. The shading correction is, forexample, white correction and black correction. In the image processingunit 46, black correction data is set for the back correction, and whitecorrection data is set for the white correction. For example, when theimage processing unit 46 is set to execute the shading correction andnot to execute the gamma correction, the image processing unit 46subjects the digital data to the back correction in accordance with theset black correction data, and subjects the digital data, which has beensubjected to the black correction, to the white correction so as togenerate the digital image data.

The drive circuit 47 is connected to the conveying motor 47, and drivesthe conveying motor MT in accordance with drive instructions transmittedfrom the CPU 40. The drive circuit 47 rotates the conveying motor MT inaccordance with the rotation amount and the rotation directioninstructed by the drive instructions. When the conveying motor MTrotates by a particular amount, the conveying rollers 23 and 26 rotateby a particular amount, and thereby the original sheet GS is conveyed bya particular distance along the conveying path 20.

(Operation in 1st Illustrative Embodiment)

Hereafter, operation of the image scanning apparatus 1 according to a1st illustrative embodiment is described. The image scanning apparatus 1executes the maintenance main process before scanning the original sheetGS, and executes the scanning main process for scanning the originalsheet GS. Processes M1 to M12 in the maintenance main process andprocesses R1 to R8 in the scanning main process and the subroutines areexecuted under control of the CPU 40. In this illustrative embodiment,data processing which the CPU 40 executes for each pixel in one line isexecuted for each pixel of each of three colors in a color mode, and isexecuted for each pixel of a particular color in a monochrome mode. Inthis illustrative embodiment, explanation is given regarding the colormode.

(Maintenance Main Process)

The maintenance main process shown in FIG. 5 may be executed when anoperator operates the operation unit 5 of the image scanning apparatus 1in accordance with a particular operation manner at a factory beforedelivering the image scanning apparatus 1 to a customer or at acustomer's location of the image scanning apparatus 1.

First, when a white reference original sheet WGS being a white referenceis placed on the paper supply tray 2, the original sensor 27 detects thewhite reference original sheet WGS. The CPU 40 determines whether thewhite reference original sheet WGS exists in accordance with a detectionsignal from the original sensor 27 (M1). Specifically, the CPU 40determines that the white reference original sheet WGS exists when theoriginal sensor 27 is ON (M1: Yes), and then the process proceeds to theprocess M2. When the original sensor 27 is OFF, the CPU 40 determinesthat the white reference original sheet WGS does not exist (M1: No), andthen the process proceeds to process M10. In the process M10, the CPU 40displays, on the display unit 6, an error message indicating that aplacement status of the original sheet GS is incorrect, and themaintenance main process is ended.

In process M2, the CPU 40 causes the drive circuit 47 to convey thewhite reference original sheet WGS to the platen glass 25, andinitializes the device controller 44, the AFE 45 and the imageprocessing unit 46. Specifically, the CPU 40 transmits a driveinstruction to the drive circuit 47 to supply the white referenceoriginal sheet WGS placed on the paper supply tray 2 to the platen glass25. Further, the CPU 40 obtains, from the flash PROM 43, settingsregarding the clock signal CLK and the serial-in signal SI correspondingto the scanning resolution of 300 DPI to set the device controller 44.The CPU 40 obtains, from the flash PROM 43, settings regarding a signalto the light source 30 corresponding to the color mode, and sets thedevice controller 44. The CPU 40 obtains, from the flash PROM 43, theoffset adjustment value and the gain adjustment value for the AFE 45,and sets them to the AFE 45. The CPU 40 sets the image processing unit46 not to execute the various image processing.

The CPU 40 adjusts the light amount of the light source 30 (M3).Specifically, the CPU 40 causes the light source 30 to emit light to thewhite reference original sheet WGS, and adjusts the light amount ST ofeach color so that the analog signal obtained when the reflection lightfrom the white reference original sheet WGS is scanned is the maximumwithin the input range of the AFE 45. It is noted that the light amountST is determined by the lighting time and the current value for eachcolor in one line of the light source 30. Each color is red, blue orgreen used in the color mode.

The CPU 40 obtains white data WH (M4). Specifically, the CPU 40 causesthe light source 30 to turn on in the light amount ST, and scans thewhite reference original sheet WGS with the scanning device 24. Then,the CPU 40 obtains, as the white data WH, the digital image data of eachpixel on the scanned one line.

The CPU 40 obtains black data BK1 (M5). Specifically, the CPU 40 causesthe light source 30 to turn off, and scans the white reference originalsheet WGS with the scanning device 24. Then, the CPU 40 obtains, as theblack data BK1, the digital image data of each pixel of one color of thescanned one line. In this case, the one color corresponds to a darkcolor in a state where the light source 30 is turned off.

The CPU 40 obtains white and black difference data WBdif (M6).Specifically, the CPU 40 subtracts the black data BK1 from the whitedata WH for each pixel of each color in one line, and stores thesubtraction result, as the white and black difference data WBdif of eachpixel of each color in the one line, in the RAM 42.

The CPU 40 obtains five pixel white average 5WBdif1 (M7). Details aboutthe five pixel white average 5WBdif1 are explained later. Here, the fivepixel white average 5WBdif1 is briefly explained. The CPU 40 calculatesthe five pixel white average 5WBdif1 by averaging the white and blackdifference data WBdif of successively adjoining five pixels for eachpixel of each color in one line. The CPU 40 stores, in the flash PROM43, the calculated five pixel white average 5WBdif1 for each pixel ofeach color in one line. In this illustrative embodiment, the five pixelwhite average 5WBdif1 is calculated using five pixels successivelyadjoining from each pixel in one line. Each lens of the rod lens array32 is arranged every 0.4 mm Each photoelectric conversion element 33 isarranged in a manner of 300 DPI, i.e., three-hundred (300) elements perinch. Therefore, each lens of the rod lens array 32 would pass lighttoward approximately 4.72 elements, i.e., 4.72 pixels. In thisillustrative embodiment, based on the fact that an integer nearest to4.72 is 5, the five pixel white average 5WBdif1 is calculated using thewhite and black difference data of successive adjoining five pixels.From the same reason, five successively adjoining pixels are used ineach of process MA3, process MA4, process MB3, process MB4, process RA3,process RB3, process RB4, process RC5 and process RC6. By averaging thewhite and black difference data of five pixels or light gray and blackdifference data LGBdif of five pixels, influence of lens ripples causedby the rod lens array 32 may be removed.

The CPU 40 calculates one line white average WBdifL (M8). Specifically,the CPU 40 averages the white and black difference data WBdif of all thepixels in one line to calculate the one line white average WBdifL. TheCPU 40 stores the calculated one line white average WBdifL in the flashPROM 43.

After the process M8 is finished, the CPU 40 causes the image scanningapparatus 1 to stay in a standby state until a set key disposed on theoperation unit 5 is pressed (M9). When a worker removes the whitereference original sheet WGS and presses the set key, the CPU 40determines whether the original sensor 27 is in an off state. The CPU 40determines that the white reference original sheet WGS does not existwhen the original sensor 27 is in the off state (M9: No), and theprocess proceeds to process M11. The CPU 40 determines that the whitereference original sheet WGS exists when the original sensor 27 is inthe on state (M9: Yes), and the process proceeds to process M10. In theprocess M10, the CPU 40 causes the display unit 6 to display an errormessage indicating a placement state of the original sheet GS isincorrect. Then, the maintenance main process is ended.

In the process M11, the CPU 40 obtains gray data GR. Specifically, theCPU 40 illuminates a gray reference plate 34 with the light amount ST ofeach color, and obtains, as the gray data GR, the digital image data ofeach pixel of each color on one line scanned by the scanning device 24.

In the process M12, the CPU 40 obtains gray data maximum GRmax.Specifically, the CPU 40 obtains, as the gray data maximum GRmax, themaximum value of all the gray data GR of the pixels of each color in oneline obtained in the process M11. The CPU 40 stores, in the flash PROM43, the gray data maximum GRmax of each color while associating the graydata maximum GRmax with the corresponding color. After the process Ml 1is finished, the maintenance main process is ended.

(Five Pixel White Average 5WBdif1 Obtaining Process M7)

When the five pixel white average 5WBdif1 obtaining process (M7) shownin FIG. 6 is started, the CPU 40 sets a target pixel TPX (MA1).Specifically, when the target pixel TPX has already been set, the CPU 40newly sets, as a new target pixel TPX, a pixel next to the already settarget pixel TPX. When no target pixel has been set, the CPU 40 sets thetop pixel as the target pixel TPX. By counting the number of pixels setas the target pixels, the CPU 40 obtains the pixel number PN of eachtarget pixel and stores the pixel number PN in the RAM 42.

Next, in process MA2, the CPU 40 determines whether the target pixel TPXis a top side pixel or a last side pixel. Specifically, when the pixelnumber PN of the target pixel TPX is smaller than or equal to 1296 beinga half of the pixel number PN of the last pixel in one line, the CPU 40determines that the target pixel TPX is the top side pixel in one line(MA2: Top Side Pixel) and the process proceeds to process M3. When thepixel number PN of the target pixel TPX is larger than 1296, the CPU 40determines that the target pixel TPX is the last side pixel in one line(MA2: Last Side Pixel), and the process proceeds to process MA4.

In process MA3, the CPU 40 calculates the five pixel white average5WBdif1 in the top side pixels. Specifically, the CPU 40 obtains thefive pixel white average 5WBdif1 of the target pixel TPX by averagingthe white and black difference data WBdif of five pixels in totalincluding the white and black difference data WBdif of the target pixelTPX and the white and black difference data WBdif of four pixelssuccessively adjoining the target pixel TPX toward the last pixel side.Then, the process proceeds to process MAS.

In the process MA4, the CPU 40 calculates the five pixel white average5WBdif1 in the last side pixels. Specifically, the CPU 40 obtains thefive pixel white average 5WBdif1 of the target pixel TPX by averagingthe white and black difference data WBdif of five pixels in totalincluding the white and black difference data WBdif of the target pixelTPX and the white and black difference data WBdif of four pixelssuccessively adjoining the target pixel TPX toward the top pixel side.

In the process MA5, the CPU 40 determines whether the target pixel TPXis the last pixel. Specifically, the CPU 40 determines whether the pixelnumber PN of the target pixel TPX is equal to 2592 which is the pixelnumber PN of the last pixel. When the pixel number PN of the targetpixel TPX is not 2592, the CPU 40 determines that the target pixel TPXis not the last pixel (MA5: No), and then the process returns to theprocess MA1. When the pixel number PN of the target pixel TPX is 2592,the CPU 40 determines that the target pixel TPX is the last pixel (MA5:Yes) and deletes the setting of the target pixel TPX. Then, the processproceeds to process MA6.

In the process MA6, the CPU 40 stores the five pixel white average5WBdif1. Specifically, the CPU 40 stores the five pixel white average5WBdif1 calculated in the processes MA3 and MA4 in the flash PROM 43 asthe five pixel white average 5WBdif1 for each pixel of each color in oneline. After process MA6 is finished, the five pixel white average5WBdif1 obtaining process (M7) is ended.

(Scanning Main Process)

The scanning main process shown in FIG. 7 is started when a user placethe original sheet GS on the paper supply tray 2 and presses a colorscanning start button provided on the operation unit 5. In thefollowing, the scanning main process is explained in regard to the casewhere the color mode is designated.

The CPU 40 initializes the device controller 44, the AFE 45 and theimage processing unit 46 (R1). Specifically, the CPU 40 obtains, fromthe flash PROM 43, settings of the clock signal CLK and the serial-insignal SI corresponding to the scanning resolution of 300 DPI, and setsthe obtained settings to the device controller 44. The CPU 40 obtains,from the flash PROM 43, settings in the color mode for a signal to thelight source 30, and sets the obtained settings to the device controller44. The CPU 40 obtains, from the flash PROM 43, the offset adjustmentvalue and the gain adjustment value for the AFE 45, and sets theobtained settings to the AFE 45. The CPU 40 sets the image processingunit 46 not to execute the various image processing.

In process R2, the CPU 40 adjusts the light amount of the light source30. Specifically, the CPU 40 causes the light source 30 to emit light tothe gray reference plate 34, and adjusts the light amount ST of eachcolor so that the maximum value of the digital image data when thereflection light from the gray reference plate 34 is scanned is the graydata maximum GRmax.

In process R3, the CPU 40 obtains black data BK2. Specifically, the CPU40 causes the light source 30 to turn off, and causes the scanningdevice 24 to scan the gray reference plate 34. The CPU 40 obtains, asthe black data BK2, the digital image data of each pixel of one color inthe scanned one line.

In process R4, the CPU 40 turns on the light source 30 at the maximumlight amount. Specifically, the CPU 40 turns on the light source 30 atthe maximum current preliminary set for each color and in the maximumlighting period for the scanning resolution of 300DPI.

In process R5, the CPU 40 obtains light gray data LGR. Specifically, theCPU 40 illuminates the gray reference plate 34 in a state where thelight source 30 is turned on at the maximum light amount for each color,and obtains, as the light gray data LGR, the digital image data for eachpixel of each color in the scanned one line.

In process R6, the CPU 40 calculates light gray and black differencedata LGBdif. Specifically, the CPU 40 subtracts the black data BK2 fromthe light gray data LGR of each pixel of each color in the scanned oneline to obtain the light gray and black difference data LGBdif of eachpixel of each color in the one line.

In process R7, the CPU 40 calculates reference data CD1. Details aboutthe calculation of the reference data CD1 are described later. Here, thecalculation of the reference data CD1 is briefly explained. The CPU 40calculates one line gray average LGBdifL. The CPU 40 calculates, as anaverage ratio AVRT, the ratio between the one line white average WBdifLand the one line gray average LGBdifL. The CPU 40 calculates, for eachpixel in one line, the five pixel gray average 5LGBdif1 by averaging thelight gray and black difference data LGBdif of successively adjoiningfive pixels in one line. The CPU 40 calculates ripple data RD1 based onthe light gray and black difference data LGBdif, the five pixel grayaverage 5LGBdif1, and the average ratio AVRT. The CPU 40 calculates thereference data CD1 based on the ripple data RD1 and the five pixel whiteaverage 5WBdif1.

In process R8, the CPU 40 executes a scanning process. Specifically, theCPU 40 sets the image processing unit 46 to execute the various imageprocessing. The CPU 40 outputs instructions to the drive circuit 47 tocause the drive circuit 47 to convey the original sheet GS. The CPU 40causes the scanning device 24 to scan the original sheet GS, andexecutes shading correction for each color while using the referencedata CD1 calculated in the process R7 as the white correction data, andfurther executes the various correction processes to generate thedigital image data. After the process R8 is finished, the scanning mainprocess is ended.

(Reference Data CD1 Calculation Process R1)

When the reference data CD1 calculation process (R7) shown in FIG. 8 isstarted, the CPU 40 calculates the one line gray average LGBdifL (RA1).Specifically, the CPU 40 averages the light gray and black differencedata LGBdif of all the pixels in one line to obtain the one line grayaverage LGBdifL. The CPU 40 stores the calculated one line gray averageLGBdifL in the flash PROM 43.

In process RA2, the CPU 40 calculates the average ratio AVRT.Specifically, the CPU 40 divides the one line white average WBdifL bythe one line gray average LGBdifL to obtain the average ratio AVRT.

In process RA3, the CPU 40 obtains five pixel gray average 5LGBdif1.Details about calculation of the five pixel gray average 5LGBdif1 willbe described later. Here, calculation of the five pixel gray average5LGBdif1 is briefly explained. The CPU 40 averages, for each pixel inone line, the light gray and black difference data LGBdif ofsuccessively adjoining five pixels to obtain the five pixel gray average5LGBdif1. The CPU 40 stores, in the flash PROM 43, the five pixel grayaverage 5LGBdif1 for each pixel of each color in one line.

In process RA4, the CPU 40 calculates the ripple data RD1. Specifically,the CPU 40 subtracts the five pixel gray average 5LGBdif1 from the lightgray and black difference data LGBdif, and multiplies the subtractionresult by the average ratio AVRT to obtain the ripple data RD1 for eachpixel of each dolor in one line. In process RA5, the CPU 40 calculatesthe reference data CD1. Specifically, the CPU 40 adds the ripple dataRD1 to the five pixel white average 5WBdif1 to calculate the referencedata CD1 for each pixel of each color in one line, and stores thereference data CD1 in the RAM 42. After the process RA2 is finished, thereference data CD1 calculation process (R7) is ended.

(Five Pixel Gray Average 5LGBdif1 Obtaining Process)

When the five pixel gray average 5LGBdif1 obtaining process (RA3) shownin FIG. 9 is started, the CPU 40 sets a target pixel TPX as in the caseof the process MA1 (RB1). Specifically, when the target pixel TPX hasalready been set, the CPU 40 newly sets a next pixel as the target pixelTPX. On the other hand, when no target pixel TPX is set, the CPU 40 setsthe top pixel as the target pixel TPX.

As in the case of the process MA2, the CPU 40 determines whether thetarget pixel TPX is a top side pixel in one line or a last side pixel inone line (RB2). Specifically, the CPU 40 determines that the targetpixel is a pixel on the top pixel side when the pixel number PN of thetarget pixel TPX is smaller than or equal to 1296 (RB2:Top Side Pixel),and then the process proceeds to process RB3. The CPU 40 determines thatthe target pixel TPX is a pixel on the last pixel side when the pixelnumber PN of the target pixel is larger than 1296 (RG2: Last SidePixel), and then the process proceeds to process RB4.

The CPU 40 calculates the five pixel gray average 5LGBdif1 at the pixelof the top pixel side (RB3). Specifically, the CPU 40 averages the lightgray and black difference dataLGBdif of five pixels in total includingthe light gray and black difference data LGBdif of the target pixel TPXand the light gray and black difference data LGBdif of four pixelssuccessively adjoining the target pixel TPX toward the last pixel side,to calculate the five pixel gray average 5LGBdif1 of the target pixelTPX. After the process RB3 is finished, the process proceeds to processRBS.

The CPU 40 calculates the five pixel gray average 5LGBdif1 at the pixelof the last pixel side (RB4). Specifically, the CPU 40 averages thelight gray and black difference dataLGBdif of five pixels in totalincluding the light gray and black difference data LGBdif of the targetpixel TPX and the light gray and black difference data LGBdif of fourpixels successive adjoining the target pixel TPX toward the top pixelside, to calculate the five pixel gray average 5LGBdif1 of the targetpixel TPX.

In process RBS, the CPU 40 determines whether the target pixel TPX isthe last pixel as in the case of the process MAS. Specifically, the CPU40 determines whether the pixel number PN of the target pixel TPX is2592. When the pixel number PN of the target pixel TPX is not 2592, theCPU 40 determines that the target pixel TPX is not the last pixel (RB5:No), and then the process returns to process RB1. When the pixel numberPN of the target pixel TPX is 2592, the CPU 40 determines that thetarget pixel TPX is the last pixel (RB5: Yes), and deletes the settingsof the target pixel TPX. Then, the process proceeds to process RB6.

In process RB6, the CPU 40 stores the five pixel gray average 5LGBdif1.Specifically, the CPU 40 stores, in the flash PROM43, the five pixelgray average 5LGBdif1 calculated in the processes RB3 and RB4 as thefive pixel gray average 5LGBdif1 of each pixel of each color in oneline. After the process RB6 is finished, the five pixel gray average5LGBdif1 obtaining process is ended.

(Operation of 2nd Illustrative Embodiment)

Hereafter, operation of an image scanning apparatus 1 according to a 2ndillustrative embodiment is explained with reference to the accompanyingdrawings. In the following, explanation of the 2nd illustrativeembodiment focuses on the operation different from the 1st illustrativeembodiment. The operation in the 2nd illustrative embodiment differentfrom the 1st illustrative embodiment is that the five pixel whiteaverage 5WBdif1 obtaining process (M7) in the 1st illustrativeembodiment is altered to a five pixel white average 5WBdif2 obtainingprocess (M7), and the reference data CD1 calculation process (R7) in the1st illustrative embodiment is altered to a reference data CD2calculation process (R7).

(Five Pixel White Average 5WBdif2 Obtaining Process)

When the five pixel white average 5WBdif2 obtaining process (M7) shownin FIG. 10 is started, the CPU 40 sets a target block TB (MB1).Specifically, when a target block TB has already been set, the CPU 40sets, as the target block TB, five pixels successively adjoining the settarget block TB. When no target block TB has been set, the CPU 40 sets,as the target block TB, five pixels in total successively adjoining fromthe top pixel to the 5^(th) pixel. When the number of pixels from theset target block TB to the last pixel is smaller than or equal to fivepixels, the CPU 40 sets, as the target block TB, five pixelssuccessively adjoining from the last pixel to the 5^(th) to the lastpixel. In this illustrative embodiment, when the five successivelyadjoining pixels from the last pixel to the 5th to the last pixel havebeen set as the target block TB, the target block TB is referred to asthe end block EB.

In process MB2, the CPU 40 determines whether the target block TB is theend block EB. Specifically, when the last pixel is set as the targetblock, the CPU 40 determines that the target block TB is the end blockEB (MB2: YES), and the process proceeds to the process MB4. When thelast pixel is not set as the target block TB, the CPU 40 determines thatthe target block TB is not the end block EB (MB2: NO), and the processproceeds process MB3.

When the determination result in the process MB2 is NO, the CPU 40calculates the five pixel white average 5Wbdif2 for a block other thanthe end block EB (MB3). Specifically, the CPU 40 averages the white andblack difference data WBdif of five pixels set in the target block TB tocalculate the five pixel white average 5WBdif2 of pixels set in thetarget block TB. After the process MB3 is finished, the process returnsto process MB1.

When the determination result in the process MB2 is YES, the CPU 40calculates the five pixel white average 5WBdif2 for the end block EB(MB4). Specifically, pixels set in the end block EB include pixels forwhich the five pixel white average 5WBdif2 has not been calculated inthe process MB3. The CPU 40 calculates the five pixel white average5WBdif2 by averaging the white and black difference data WBdif of fivepixels set in the target block TB.

In the process MB5, the CPU 40 stores the five pixel white average5WBdif2. Specifically, the CPU 40 stores, in the flash PROM 43, the fivepixel white average 5Wbdif2 calculated in the processes MB3 and MB4, asthe five pixel white average 5Wbdif2 for each pixel of each color in oneline. The CPU 40 deletes the setting of the target block TB. After theprocess MB5 is finished, the five pixel white average 5WBdif2 obtainingprocess (M7) is ended.

(Reference DataCD2 Calculation Process)

When the reference data CD2 calculation process shown in FIG. 11 isstarted, the CPU 40 calculates the one line gray average LGBdifL as inthe case of the process RA1 (RC1). Specifically, the CPU 40 averages thelight gray and black difference data LGBdif of all the pixels in oneline to calculate the one line gray average LGBdifL and stores the oneline gray average LGBdifL in the flash PROM 43.

In process RC2, the CPU 40 calculates the average ratio AVRT as in thecase of the process RA2. Specifically, the CPU 40 divides the one linewhite average WBdifL by the one line gray average LGBdifL to calculatethe average ratio AVRT.

In process RC3, the CPU 40 sets the target block TB. Specifically, whenthe target block TB has already been set, the CPU 40 sets next fivepixels successively adjoining the set target block TB as a next targetblock TB. When no target block TB has been set, the CPU 40 sets, as thetarget block, five pixels in total successively adjoining from the toppixel to the 5^(th) pixel.

In process RC4, the CPU 40 determines whether the target block TB is theend block EB. Specifically, when the last pixel is set as the targetblock TB, the CPU 40 determines that the target block TB is the endblock EB (RC4: YES), and the process proceeds to process RC6. When thelast pixel is not set as the target block TB, the CPU 40 determines thatthe target block TB is not the end block EB (RC4: NO), and the processproceeds to process RC5.

When the determination result of the process RC4 is NO, the CPU 40calculates the five pixel gray average 5LGBdif2 for a target block TBother than the end block EB (RC5). Specifically, the CPU 40 averages thelight gray and black difference LGBdif of five pixels set as the targetblock TB to calculate the five pixel gray average 5LGBdif2 of the pixelsset as the target block TB. After the process RC5 is finished, theprocess returns to the process RC3.

When the determination result of the process RC4 is YES, the CPU 40calculates the five pixel gray average 5LGBdif2 of five pixels in theend block EB (RC6). Specifically, pixels set as the end block EB includepixels for which the five pixel gray average 5LGBdif2 has not beencalculated in the process RC5. The CPU 40 averages the light gray andblack difference data LGBdif of five pixels set as the target block TBto calculate the five pixel gray average 5LGBdif2 for the pixels forwhich the five pixel gray average 5LGBdif2 has not been calculated.Then, the CPU 40 deletes the setting of the target block TB.

In process RC7, the CPU 40 calculates the ripple data RD2. Specifically,the CPU 40 subtracts the five pixel gray average 5LGBdif2 from the lightgray and black difference data LGBdif, and multiplies the calculatedresult by the average ratio AVRT to calculate the ripple data RD2 foreach pixel of each color in one line.

In process RC8, the CPU 40 calculates the reference data CD2.Specifically, the CPU 40 adds the ripple data RD2 to the five pixelwhite average 5WBdif2 to calculate the reference data CD2 for each pixelof each color in one line, and stores the reference data CD2 in the RAM42. After the process RC8 is finished, the reference data CD2calculation process (R7) is ended.

(Advantageous Effects)

In the 1st illustrative embodiment, the white and black difference dataWBdif is calculated in the process M6 of the maintenance main process.In the process MA3 and the process MA4 of the process M7 of themaintenance main process, the five pixel white average 5WBdif1 iscalculated. In the process M8, the one line white average WBdifL iscalculated. In the process R6 of the scanning main process, the lightgray and black difference data LGBdif is calculated. In the process RA1of the process R7 of the scanning main process, the one line grayaverage LGBdifL is calculated. In the process RA2, the average ratioAVRT is calculated by dividing the one line white average WBdifL by theone line gray average LGBdifL. In the process RB3 and the process RB4 ofthe process RA3, the five pixel gray average 5LGBdif1 is calculated. Inthe process RA4, the ripple data RD1 is calculated by subtracting thefive pixel gray average 5LGBdif1 from the light gray and blackdifference data LGBdif and by multiplying the subtraction result by theaverage ratio AVRT. In the process RA5, the reference data CD1 iscalculated by adding the ripple data RD1 to the five pixel white average5WBdif1. In the process R8, the shading correction is performed by usingthe reference data CD1 as the white correction data. Therefore, evenwhen the position shift smaller than a shift amount of one pixel occursbetween the rod lens array and the photoelectric conversion elements,the reference data CD1 not affected by the position shift can becalculated because the ripple data RD1 is calculated based on the lightgray and black difference data LGBdif. As a result, the precise shadingcorrection can be performed while using the reference data CD1 as thewhite correction data.

In the 2nd illustrative embodiment, the white and black difference dataWBdif is calculated in the process M6 of the maintenance main process.In the process MB3 and the process MB4 of the process M7 of themaintenance main process, the five pixel white average 5WBdif2 iscalculated. In the process M8, the one line white average WBdifL iscalculated. In the process R6 of the scanning main process, the lightgray and black difference data LGBdif is calculated. In the process RC1of the process R7 of the scanning main process, the one line grayaverage LGBdifL is calculated. In the process RC2, the average ratioAVRT is calculated by dividing the one line white average WBdifL by theone line gray average LGBdifL. In the process RC5 and the process RC6,the five pixel gray average 5LGBdif2 is calculated. In the process RC7,the ripple data RD2 is calculated by subtracting the five pixel grayaverage 5LGBdif2 from the light gray and black difference data LGBdifand by multiplying the subtraction result by the average ratio AVRT. Inthe process RC8, the reference data CD2 is calculated by adding theripple data RD2 to the five pixel white average 5WBdif2 . In the processR8, the shading correction is performed by using the reference data CD2as the white correction data. Therefore, even when the position shiftsmaller than a shift amount of one pixel occurs between the rod lensarray and the photoelectric conversion elements, the reference data CD2not affected by the position shift can be calculated because the rippledata RD2 is calculated based on the light gray and black difference dataLGBdif. As a result, the precise shading correction can be performedwhile using the reference data CD2 as the white correction data.

(Variations)

It is noted that the present disclosure is not limited to the abovedescribed illustrative embodiment, and the above described illustrativeembodiment can be varied in various ways within the scope of the presentdisclosure as follows.

(1) The image scanning apparatus 1 may be applied to a multifunctionapparatus including a printer. In the above described illustrativeembodiment, the image scanning apparatus is configured to include onescanning device 24 and one gray reference plate 34. However, the imagescanning device may be configured to include two scanning devices andtwo gray reference plates so as to scan both sides of an original sheetGS.

(2) In the above described illustrative embodiment, all of themaintenance main process shown in FIG. 5 and the scanning main processshown in FIG. 7 are executed by the CPU 40. However, the presentdisclosure is not limited to such a configuration. For example, a partof the processes M3 to M8 and the processes M11 to M12 of themaintenance main process and a part of the processes R2 to R8 of thescanning main process may be executed by the image processing unit 46,the device controller 44 or the AFE 45. The maintenance main process maybe executed by an external apparatus, such as a computer, providedseparately from the image scanning apparatus 1.

(3) The image scanning apparatus may be configured to include a whitereference plate in place of the gray reference plate 34. In the casewhere the white reference plate is used, the average ratio AVRT is 1,and it is unnecessary to calculate the average ratio AVRT. Furthermore,in the case where the white reference plate is used, the light source 32may be turned on at the light amount ST although the light source 32 isturned on at the maximum light amount in the process R4.

(4) In the above described illustrative embodiment, the maintenance mainprocess shown in FIG. 5 and the scanning main process shown n FIG. 7 areexplained in regard to the color mode. However, these processes may beexecuted in the monochrome mode. In the color mode, one line isconstituted by the three colors. On the other hand, in the monochromemode, one line is constituted by one color.

(5) The image scanning apparatus according to the above describedillustrative embodiment is configured such that the scanning device 24is able to scan an original sheet in the resolution of 300 DPI. However,the scanning device may be configured to scan an original sheet at otherresolutions, e.g., 600 DPI or 1200 DPI. In such a case, unevenness ofcollected light amount is cause by a rod lens at an interval of 10pixels in the case of the resolution of 600 DPI, and unevenness ofcollected light amount is caused by a rod lens at an interval of 20pixels in the case of the resolution of 1200 DPI.

(6) In the above described illustrative embodiment, the interval of rodelenses is 0.4 mm However, the interval of rod lenses may be anothervalue, e.g., 1.0 mm In the case of the interval of rod lenses of 1.0 mm,unevenness of collected light amount is caused by a rod lens at aninterval of 12 pixels.

What is claimed is:
 1. An image scanning apparatus, comprising: ascanning device configured to scan an original sheet; a reference memberdisposed to face the scanning device; a correction unit configured toexecute shading correction for image data obtained by the scanningdevice based on correction data; a controller; and a storage device, thescanning device comprising: a light source; a plurality of lightreceiving elements arranged in one line; and a lens array having aplurality of lenses, the lens array being configured to converge lightemitted by the light source onto the plurality of light receivingelements; wherein the controller is configured to execute: a preparationprocess; and an executive process to be executed after execution of thepreparation process, wherein the preparation process comprises: a whitereference data obtaining process in which the controller obtains whitereference data for each of the plurality of light receiving elements inthe one line by causing the scanning device to scan a white referenceoriginal sheet; and a white storing process in which the controllerobtains white basic data by averaging, for each of the plurality oflight receiving elements in the one line, the white reference data of aparticular number of successively adjoining elements of the plurality oflight receiving elements and stores the white basic data in the storagedevice, wherein an interval spaced by the particular number of elementscorresponds to an interval of the plurality of lenses of the lens array,wherein the executive process comprises: a reference member dataobtaining process in which the controller obtains reference member datafor each of the plurality of light receiving elements in the one line bycausing the scanning device to scan the reference member; a lensfluctuation calculation process in which the controller calculates, foreach of the plurality of light receiving elements in the one line,fluctuation data of the correction data based on the reference memberdata; and a correction data generation process in which the controllergenerates, for each of the plurality of light receiving elements in theone line, the correction data by adding the fluctuation data to thewhite basic data.
 2. The image scanning apparatus according to claim 1,wherein the preparation process further comprises a white averagecalculation process in which the controller calculates a white averageby averaging the white reference data of all of the plurality of lightreceiving elements in the one line, wherein the lens fluctuationcalculation process comprises: a reference average calculation processin which the controller calculates a reference average by averaging thereference member data of all of the plurality of light receivingelements in the one line; a reference basic calculation process in whichthe controller obtains reference basic data by averaging, for each ofthe plurality of light receiving elements in the one line, the referencemember data of the particular number of successively adjoining elementsof the plurality of light receiving elements; and a fluctuation datacalculation process in which the controller obtains, for each of theplurality of light receiving elements in the one line, the fluctuationdata by calculating reference fluctuation data while subtracting thereference basic data from the reference member data, by multiplying thereference fluctuation data by the white average, and by dividing amultiplication result by the reference average.
 3. The image scanningapparatus according to claim 2, wherein: the plurality of lightreceiving elements is an even number of light receiving elements; in thereference basic calculation process, for each of top side lightreceiving elements arranged from a top pixel position to a centralposition in an arrangement region of the plurality of light receivingelements in the one line, the controller calculates the reference basicdata by averaging the reference member data of the particular number ofsuccessively adjoining elements which successively adjoin from each ofthe top side light receiving elements toward a last pixel side; and inthe reference basic calculation process, for each of last side lightreceiving elements arranged from the central position to a last pixelposition in the arrangement region of the plurality of light receivingelements in the one line, the controller calculates the reference basicdata by averaging the reference member data of the particular number ofsuccessively adjoining elements which successively adjoin from each ofthe last side light receiving elements toward a top pixel side.
 4. Theimage scanning apparatus according to claim 3, wherein: in the whitestoring process, for each of top side light receiving elements, thecontroller calculates the white basic data by averaging the whitereference data of the particular number of successively adjoiningelements which successively adjoin from each of the top side lightreceiving elements toward the last pixel side; and in the white storingprocess, for each of last side light receiving elements, the controllercalculates the white basic data by averaging the white reference data ofthe particular number of successively adjoining elements whichsuccessively adjoin from each of the last side light receiving elementstoward the top pixel side.
 5. The image scanning apparatus according toclaim 2, wherein in the reference basic calculation process, thecontroller divides the plurality of light receiving elements into aplurality of first groups while assigning, sequentially from a top lightreceiving element, the plurality of light receiving elements to theplurality of first groups in a unit of the particular number ofsuccessively adjoining elements, and averages, for each of the pluralityof first groups, the reference member data of the particular number ofsuccessively adjoining elements assigned to each of the plurality offirst groups so as to obtain the reference basic data.
 6. The imagescanning apparatus according to claim 5, wherein, regarding a particularone of the plurality of first groups including a last light receivingelement, when a number of light receiving elements in the particular oneof the plurality of light receiving elements is less that the particularnumber, the particular number of successively adjoining elements whichsuccessively adjoin from the last light receiving element toward the toplight receiving element are assigned to the particular one of theplurality of first groups.
 7. The image scanning apparatus according toclaim 5, wherein in the white storing process, the controller dividesthe plurality of light receiving elements into a plurality of secondgroups while assigning, sequentially from a top light receiving element,the plurality of light receiving elements to the plurality of secondgroups in a unit of the particular number of successively adjoiningelements, and averages, for each of the plurality of second groups, thewhit reference data of the particular number of successively adjoiningelements assigned to each of the plurality of second groups so as toobtain the white basic data.
 8. The image scanning apparatus accordingto claim 7, wherein, regarding a particular one of the plurality ofsecond groups including a last light receiving element, when a number oflight receiving elements in the particular one of the plurality of lightreceiving elements is less that the particular number, the particularnumber of successively adjoining elements which successively adjoin fromthe last light receiving element toward the top light receiving elementare assigned to the particular one of the plurality of second groups. 9.A method implemented in an image scanner, the image scanner comprising:a light source; a sensor array including a plurality of optical elementsarranged in one line; and a lens array having a plurality of lenses,each lens being configured to converge light from the light source ontoa particular number of adjoining optical elements; a reference member; acorrection circuit configured to execute shading correction usingcorrection data, a controller; and a storage device, wherein the methodcomprising: scanning a white reference original sheet by emitting lightfrom the light source; receiving white reference data outputted fromeach optical element; generating white basic data of each opticalelement by averaging the white reference data received from theparticular number of adjoining optical elements; storing the white basicdata in the storage device; scanning the reference member by emittinglight from the light source; receiving reference member data outputtedfrom each optical element; generating fluctuation data of each opticalelement according to a particular calculation based on the referencemember data; and generating the correction data of each optical elementby adding the fluctuation data to the white basic data.
 10. The methodaccording to claim 9, further comprising: generating a white average byaveraging the white reference data of all optical elements, wherein thegenerating fluctuation data includes: generating a reference average byaveraging the reference member data of all optical elements; generatingreference basic data of each optical element by averaging the referencemember data of the particular number of adjoining optical elements; andgenerating reference fluctuation data of each optical element bysubtracting the reference basic data from the reference member data; andgenerating the fluctuation data by multiplying the reference fluctuationdata by the white average, and by dividing the multiplication result bythe reference average.
 11. The method according to claim 10, wherein:the plurality of optical elements is an even number of optical elements;for each optical element arranged between a top pixel position and acenter position of the plurality of optical element, the reference basicdata is generated by averaging the reference member data of theparticular number of adjoining optical elements, the particular numberof adjoining optical elements being successively arranged from eachoptical element toward a last pixel position; and for each opticalelement arranged between the center position and the last pixel positionof the plurality of optical elements, the reference basic data isgenerated by averaging the reference member data of the particularnumber of adjoining optical elements, the particular number of adjoiningoptical elements being successively arranged from each optical elementtoward the top pixel position.
 12. The method according to claim 11wherein: for each optical element arranged between the top pixelposition and the center position of the plurality of optical element,the white basic data is generated by averaging the white reference dataof the particular number of adjoining optical elements, the particularnumber of adjoining optical elements being successively arranged fromeach optical element toward the last pixel position; and for eachoptical element arranged between the center position and the last pixelposition of the plurality of optical elements, the white basic data isgenerated by averaging the white reference data of the particular numberof adjoining optical elements, the particular number of adjoiningoptical elements being successively arranged from each optical elementtoward the top pixel position.
 13. The method according to claim 10,further comprising: determining a plurality of groups of the opticalelements, each group including the particular number of successivelyadjoining optical elements, wherein the reference basic data of eachoptical element in each group is generated by averaging the referencemember data of the particular number of successively adjoining opticalelements in each group.
 14. The method according to claim 13, wherein: aparticular group of the optical elements includes a number of opticalelements, the particular group being one of the plurality of groups, thenumber being less than the particular number; and the reference basicdata of each optical element in the particular group is generated byaveraging the reference member data of the particular number ofsuccessively adjoining optical elements, the particular number ofsuccessively adjoining optical elements being successively arranged froma last optical element in the particular group toward a top pixelposition.
 15. The method according to claim 13, wherein the white basicdata of each optical element in each group is generated by averaging thewhite reference data of the particular number of successively adjoiningoptical elements in each group.
 16. The method according to claim 15,wherein: a particular group of the optical elements includes a number ofoptical elements, the particular group being one of the plurality ofgroups, the number being less than the particular number; and the whitebasic data of each optical element in the particular group is generatedby averaging the white reference data of the particular number ofsuccessively adjoining optical elements, the particular number ofsuccessively adjoining optical elements being successively arranged froma last optical element in the particular group toward a top pixelposition.